From: Cosimo Cecchi Date: Sat, 16 Feb 2013 20:36:57 +0000 (-0500) Subject: overviewControls: account for the search entry in each control X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4809 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=66cdbc5cadab06032a00d2a41965255a1c3b2521;p=gnome-shell.git overviewControls: account for the search entry in each control Account for the search entry space at the bottom (the former message tray clone) individually in each side control, instead of packing another actor in the overview. This allows us to extend the central view all the way to the bottom, while still keeping controls centered vertically. https://bugzilla.gnome.org/show_bug.cgi?id=693987 --- diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index d32e405e9..4f49f3ddd 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -718,6 +718,7 @@ StScrollBar StButton#vhandle:active { -vertical-spacing: 32px; padding-left: 32px; padding-right: 32px; + padding-bottom: 32px; } .window-picker.external-monitor { @@ -849,13 +850,13 @@ StScrollBar StButton#vhandle:active { } .all-app { - padding: 16px 16px 16px 48px; + padding: 0px 16px 32px 32px; spacing: 20px; } .all-app:rtl { padding-left: 16px; - padding-right: 48px; + padding-right: 32px; } .app-filter { diff --git a/js/ui/overview.js b/js/ui/overview.js index afdba1fc0..d57873443 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -230,7 +230,8 @@ const Overview = new Lang.Class({ this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox(); this._controls = new OverviewControls.ControlsManager(this._dash, this._thumbnailsBox, - this._viewSelector); + this._viewSelector, + this._searchEntryBin); // Pack all the actors into the group this._group.add_actor(this._controls.dashActor); @@ -242,14 +243,6 @@ const Overview = new Lang.Class({ this._overview.add(this._group, { y_fill: true, expand: true }); - // Then account for message tray - this._messageTrayGhost = new St.Bin({ style_class: 'message-tray-summary', - reactive: false, - opacity: 0, - x_fill: true, - y_fill: true }); - this._overview.add_actor(this._messageTrayGhost); - // TODO - recalculate everything when desktop size changes this.dashIconSize = this._dash.iconSize; this._dash.connect('icon-size-changed', diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index f0f309e9e..93420909c 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -294,15 +294,37 @@ const DashSlider = new Lang.Class({ } }); +const SlidingControlContainer = new Lang.Class({ + Name: 'SlidingControlContainer', + Extends: St.Widget, + + _init: function(child, entryBin) { + this._layout = new Clutter.BoxLayout({ vertical: true }); + this.parent({ layout_manager: this._layout }); + + child.x_expand = true; + this.add_actor(child); + + let entryClone = new St.Widget(); + entryClone.height = entryBin.height; + this.add_actor(entryClone); + + entryBin.connect('notify::height', Lang.bind(this, + function() { + entryClone.height = entryBin.height; + })); + } +}); + const ControlsManager = new Lang.Class({ Name: 'ControlsManager', - _init: function(dash, thumbnails, viewSelector) { + _init: function(dash, thumbnails, viewSelector, entryBin) { this._dashSlider = new DashSlider(dash); - this.dashActor = this._dashSlider.actor; + this.dashActor = new SlidingControlContainer(this._dashSlider.actor, entryBin); this._thumbnailsSlider = new ThumbnailsSlider(thumbnails); - this.thumbnailsActor = this._thumbnailsSlider.actor; + this.thumbnailsActor = new SlidingControlContainer(this._thumbnailsSlider.actor, entryBin); this._viewSelector = viewSelector; this._viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));